/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package NewKFP;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author $alama
 */
@Entity
@Table(name = "log")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Log.findAll", query = "SELECT l FROM Log l"),
    @NamedQuery(name = "Log.findByIdLOG", query = "SELECT l FROM Log l WHERE l.idLOG = :idLOG"),
    @NamedQuery(name = "Log.findByName", query = "SELECT l FROM Log l WHERE l.name = :name"),
    @NamedQuery(name = "Log.findByMessage", query = "SELECT l FROM Log l WHERE l.message = :message"),
    @NamedQuery(name = "Log.findByDate", query = "SELECT l FROM Log l WHERE l.date = :date"),
    @NamedQuery(name = "Log.findByType", query = "SELECT l FROM Log l WHERE l.type = :type")})
public class Log implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idLOG")
    private Integer idLOG;
    @Size(max = 45)
    @Column(name = "Name")
    private String name;
    @Size(max = 45)
    @Column(name = "Message")
    private String message;
    @Size(max = 45)
    @Column(name = "Date")
    private String date;
    @Column(name = "type")
    private Integer type;

    public Log() {
    }

    public Log(Integer idLOG) {
        this.idLOG = idLOG;
    }

    public Integer getIdLOG() {
        return idLOG;
    }

    public void setIdLOG(Integer idLOG) {
        this.idLOG = idLOG;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idLOG != null ? idLOG.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Log)) {
            return false;
        }
        Log other = (Log) object;
        if ((this.idLOG == null && other.idLOG != null) || (this.idLOG != null && !this.idLOG.equals(other.idLOG))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "NewKFP.Log[ idLOG=" + idLOG + " ]";
    }
    
}
